package com.cgly.medical.model;

import com.cgly.medical.domain.Patient;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
@NoArgsConstructor
public class PatientModel{
    private int id;
    private int age;
    private String pname;
    private String idcard;
    private String phone;
    private String email;
    private String enterTime;
    private String outTime;
    private int sex;
    private int state;
    private List<String> suggestion;

    public PatientModel(Patient patient){
        this.id=patient.getId();
        this.age=patient.getAge();
        this.pname=patient.getPname();
        this.idcard=patient.getIdcard();
        this.phone=patient.getPhone();
        this.email=patient.getEmail();
        this.enterTime=patient.getEnterTime();
        this.outTime=patient.getOutTime();
        this.sex=patient.getSex();
        this.state=patient.getState();
        this.suggestion=new ArrayList<>();
        this.suggestion.add(this.pname);
    }
}
